import axios from './index.js'

// 获取主机列表
export const getAllHsot = () => {
  return axios.request({
    url: '/api/Keepers/getAllHsot',
    method: 'get'
  })
}

// 获取cpu占有率
export const getHostCpu = (ip) => {
  return axios.request({
    url: `/api/Keepers/getHostCpu?ip=${ip}`,
    method: 'get'
  })
}
// 获取内存占有率
export const getHostMemory = (ip) => {
  return axios.request({
    url: `/api/Keepers/getHostMemory?ip=${ip}`,
    method: 'get'
  })
}
// 获取磁盘占有率
export const getHostDisk = (ip) => {
  return axios.request({
    url: `/api/Keepers/getHostDisk?ip=${ip}`,
    method: 'get'
  })
}
// 获取进程详情
export const getHostTop = (ip) => {
  return axios.request({
    url: `/api/Keepers/top?ip=${ip}`,
    method: 'get'
  })
}
// 获取网络带宽
export const getHostSpeed = (ip) => {
  return axios.request({
    url: `/api/Keepers/getHostSpeed?ip=${ip}`,
    method: 'get'
  })
}
// 获取实时负载
export const getHostPayLoad = (ip) => {
  return axios.request({
    url: `/api/Keepers/getHostPlayLoad?ip=${ip}`,
    method: 'get'
  })
}
// 获取主机状态
export const findHostInfo = (ip) => {
  return axios.request({
    url: `/api/Keepers/findHostInfo?ip=${ip}`,
    method: 'get'
  })
}